
#https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
cd /bin/
#wget https://npm.taobao.org/mirrors/node/latest-v0.12.x/node-v0.12.15-linux-x64.tar.gz
wget https://nodejs.org/dist/v0.12.15/node-v0.12.15-linux-x64.tar.gz
tar xvzf node-v0.12.15-linux-x64.tar.gz
ln -s node-v0.12.15-linux-x64/bin/node node
ln -s node-v0.12.15-linux-x64/lib/node_modules/npm/bin/npm-cli.js npm

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt-get update
apt-get install -y vim lrzsz zip unzip screen git build-essential libtool autotools-dev automake pkg-config libevent-dev bsdmainutils
apt-get install -y mongodb-org --allow-unauthenticated


echo "
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target
"  >  /etc/systemd/system/mongodb.service

systemctl start mongodb

